package com.example.springboot.controller;

import com.example.springboot.common.Result;
import com.example.springboot.mapper.NavMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wgc
 * @since 2023-06-02
 */

@RestController
@RequestMapping("/nav")
public class NavController {

    @Resource
    private NavMapper navMapper;

    //查询所有数据  新闻资讯头部导航栏
    @GetMapping()
    public Result findAll() {
        return Result.success(navMapper.findAll());
    }
}
